-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(files_sharing): implement partial mount providers #57292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
463f8cd to
5de8e11
Compare
03c02a1 to
63ec2c4
Compare
6a7f493 to
d8d172c
Compare
d8d172c to
2d22c4f
Compare
63ec2c4 to
efcdd85
Compare
e9711fb to
4d2a155
Compare
4d2a155 to
98cd77b
Compare
Signed-off-by: Salvatore Martire <[email protected]>
Signed-off-by: Salvatore Martire <[email protected]>
Signed-off-by: Salvatore Martire <[email protected]>
Signed-off-by: Louis Chmn <[email protected]>
Signed-off-by: Louis Chmn <[email protected]>
Signed-off-by: Louis Chmn <[email protected]>
98cd77b to
44ce0f0
Compare
|
I think #57550 fixes the test failures here |
Signed-off-by: Louis Chmn <[email protected]>
Signed-off-by: Louis Chmn <[email protected]>
Questions
|
| // remove /uid/files as the target is stored without | ||
| $path = \substr($path, \strlen('/' . $userId . '/files')); | ||
| // remove trailing slash | ||
| $path = \rtrim($path, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this might hold for many mount providers, it's not required and I think having it as part of the api (by having the provided path be relative) would be a bad idea.
(In general I think passing around relative paths is bad)
|
|
||
| if (!$forChildren) { | ||
| // override path with mount point when fetching without children | ||
| $path = $mountProviderArgs[0]->mountInfo->getMountPoint(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$path has a specific and separate meaning from $mountProviderArgs[0]->mountInfo->getMountPoint().
If anything, most mount providers can probably ignore the $path argument and should only look at the $mountProviderArgs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That make sense.
This means that we could use getMountPoint() for file_target instead of doing a like on $path_%?
But this won't work for the Talk folder where we have 1000+ entries.
We probably want to also keep the old index |
Returning "to much" should be harmless |
It's the part that has the actual "real" data about what mounts to setup, It would also be better for performance for mount providers to use the provided |
"All mount provider do the same" and "the way they do it should be part of the api" are two different things that I think shouldn't be conflated. |
If we return too much, should we then register those missing mounts? |
Probably, determining which of the extra ones are not registered already without extra cost might be tricky though. |
Well, we have the list of registered mount points in |
Providers could return mounts that are registered, just not requested. |
Summary
Implements
IPartialMountProviderinMountProviderfor externalfiles_sharing.This PR depends on #57289 and and #57286 and their dependant PRs to be merged to function correctly.
Once this PR is merged, all providers that do not implement
IPartialShareProviderwill stop being called during the setup and shares will disappear. It is important this is merged after all share providers implement #57285TODO
Checklist
3. to review, feature component)stable32)